package com.x.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "submit", catalog = "x")
@DynamicInsert
@DynamicUpdate
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Submit implements java.io.Serializable {

	private static final long serialVersionUID = 6517537195790609923L;

	private Date createtime;

	private String id;

	private String reason;

	private String tt;

	private String userId;

	@Temporal(TemporalType.TIMESTAMP)
	public Date getCreatetime() {
		return createtime;
	}

	@GenericGenerator(name = "generator", strategy = "uuid")
	@GeneratedValue(generator = "generator")
	@Id
	@Column(name = "id", unique = true, nullable = false, length = 32)
	public String getId() {
		return id;
	}

	@Column(name = "reason", nullable = false, length = 500)
	public String getReason() {
		return reason;
	}

	@Column(name = "tt", nullable = false, length = 300)
	public String getTt() {
		return tt;
	}

	@Column(name = "userid", nullable = false, length = 32)
	public String getUserId() {
		return userId;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	public void setId(String id) {
		this.id = id;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	public void setTt(String tt) {
		this.tt = tt;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

}
